package cn.xuexiyuan.springstudy.core.demo02;

import cn.xuexiyuan.springstudy.core.demo02.dao.SequenceDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {

    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext("cn.xuexiyuan.springstudy.core.demo02");
        SequenceDao sequenceDao = context.getBean(SequenceDao.class);

        System.out.println(sequenceDao.getNextInt("it"));
        System.out.println(sequenceDao.getNextInt("it"));
        System.out.println(sequenceDao.getNextInt("it"));
    }
}
